home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Requesting a new frame shap < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.7 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Requesting a new frame shape
  2. Sent:        6/11/96 12:16 PM
  3. Received:    6/11/96 12:31 PM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >I am requesting a new frame shape for my frame, but it's not working right.
  9. >
  10. >Here is the code I use:
  11. >
  12. >ODShape* TheShapeIWant = MyODFrame->CreateShape(ev);
  13. >TheShapeIWant->SetRectangle(ev, &MyODRect);
  14. >ODShape* MyNewShape = MyODFrame->RequestFrameShape(ev, TheShapeIWant,
  15. >kODNULL);
  16. >MyODFrame->Invalidate(ev, kODNULL, kODNULL);
  17. >MyODFrame->ChangeUsedShape(ev, kODNULL, kODNULL);    
  18. >MyODFrame->InvalidateActiveBorder(ev);
  19. >MyNewShape->Release(ev);
  20. >TheShapeIWant->Release(ev);
  21. >
  22. >After executing this code my active border changes to be the size of my
  23. >frame shape, but the clip-shape and active-shape of my facet don't appear
  24. >to be updating correctly. Afterwards, If I click in the undisplayed portion
  25. >of my frame I get a one-way trip to the debugger.
  26. >
  27. >BTW, I'm embeded within ODF Draw.
  28. >
  29. >I used this same code in my non-ODF OpenDoc part and everything worked
  30. >fine.
  31. >
  32. >-Neal
  33.  
  34. I don't know yet why the clipshape is not updated. For the active shape 
  35. your are responsible to update it. When you call RequestFrameShape, 
  36. FrameShapeChanged is not called so you need to update both your used 
  37. shape and active shape the same way you do it in FrameShapeChanged.
  38.  
  39. ........................................................................
  40.  Henri Lamiraux                                      lamiraux@apple.com
  41.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  42. ........................................................................
  43.  
  44.